<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <!-- Jquery from Google CDN --> 
</head>

<body>
<script>
	$.getJSON('functions/get_friends.php',{}, 
		function(data) {
			for(var i in data)
			{
			option=document.createElement("option");
			option.text=html_entity_decode(data[i]['name']);
			option.value=data[i]['id'];
			x.add(option,x.options[null]);
			}
	   }
	);
</script>

<label for="select">Seleccione amigos a invitar<br />
</label>
<select name="invitations" size="10" id="x">
  <option value="12313123213">Rodrigo Pavez</option>
  <option value="12312312313">Martin Gonzalez</option>
</select>
</body>
</html>
